//getters可以被看作store（仓库）的计算属性（computed properties）。
//就像组件中的计算属性一样，getters基于state中的某些状态进行计算，并返回一些派生的状态值。这些值会根据其依赖的state的变化而自动更新
//用于从状态树中获取数据,可以对状态进行计算和过滤
const getters = {
  //侧边栏信息
  sidebar: state => state.app.sidebar,
  //显示大小
  size: state => state.app.size,
  //当前设备
  device: state => state.app.device,
  //数据字典数据
  dict: state => state.dict.dict,
  //访问过的标签
  visitedViews: state => state.tagsView.visitedViews,
  //缓存的标签
  cachedViews: state => state.tagsView.cachedViews,
  //缓存的表格属性
  table: state => state.table,
  //访问令牌
  token: state => state.user.token,
  //用户头像
  avatar: state => state.user.avatar,
  //用户名称
  userInfo: state => state.user.userInfo,
  //用户id
  userId: state => state.user.userId,
  //用户角色
  roles: state => state.user.roles,
  //用户权限
  permissions: state => state.user.permissions,
  //页面路由信息
  permission_routes: state => state.route.routes,
  //顶部导航栏路由
  topbarRouters:state => state.route.topbarRouters,
  //默认路由
  defaultRoutes:state => state.route.defaultRoutes,
  //侧边栏路由
  sidebarRouters:state => state.route.sidebarRouters,
  //钉钉
  selectedNode:state => state.flow.selectedNode,
  //钉钉流程表单数据
  design:state => state.flow.design,
}
export default getters
